package sng.utils
{
	import as3isolib.geom.Pt;
	
	import flash.geom.Point;
	
	import sng.modules.view.components.city.logic.unit.BaseBuilding;
	import sng.modules.view.components.city.logic.unit.Tile;

	public class AttachmentTextUpUtil
	{
		public function AttachmentTextUpUtil()
		{
		}
		
		public static function addText(building:BaseBuilding,text:String,type:String,offsetX:int=0,offsetY:int=0):void
		{
			var attachment:AttachmentTextUp=new AttachmentTextUp(text,type);
			var pt:Pt=new Pt(building.x,building.y);
			var point:Point=building.city.cityView.isoToLocal(pt);
			point=building.city.cityView.localToGlobal(point);
			building.city.doTextTipAnimation(attachment,point.x+offsetX,point.y+offsetY);
		}
	}
}